package com.test.designPattern.ch23;

/**
 * @ClassName Context
 * @Description 这里根据传入具体的策略，来执行策略
 * @Author 维康
 * @Date 2018/6/13 11:11
 * @Version 1.0
 **/
public class Context {

    private Strategy strategy;

    public Context(Strategy strategy){
        this.strategy = strategy;
    }

    public int executeStrategy(int num1, int num2){
        return strategy.doOperation(num1, num2);
    }

}
